<HTML><HEAD><TITLE>atmost(+N, ?Vars, +V)</TITLE>
</HEAD><BODY>[ <A HREF="index.html">library(ic_global)</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>atmost(+N, ?Vars, +V)</H1>
At most N elements of Vars have the value V.
<DL>
<DT><EM>+N</EM></DT>
<DD>An integer
</DD>
<DT><EM>?Vars</EM></DT>
<DD>A collection (a la collection_to_list/2) of domain variables or integers
</DD>
<DT><EM>+V</EM></DT>
<DD>An integer
</DD>
</DL>
<H2>Description</H2>
   This constraint ensures that at most N element of Vars have the value V.
   As soon as some domain variable from the collection is updated, this
   constraint is woken and it checks if the constraint is still satisfiable
   and if so, if it is already satisfied or not.

<H3>Fail Conditions</H3>
   Fails if more than N elements of Vars are instantiated to V.
<H3>Resatisfiable</H3>
   No.
<H2>See Also</H2>
<A HREF="../../lib/ic_global/element-3.html">element / 3</A>, <A HREF="../../lib/ic_global/occurrences-3.html">occurrences / 3</A>, <A HREF="../../lib/lists/collection_to_list-2.html">lists : collection_to_list / 2</A>
</BODY></HTML>
